Optimal. Leaf size=69 \[ \frac{2 \cot (e+f x) \sqrt{a \sec (e+f x)+a}}{c f}+\frac{2 \sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{a \sec (e+f x)+a}}\right )}{c f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.147882, antiderivative size = 69, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {3904, 3887, 325, 203} \[ \frac{2 \cot (e+f x) \sqrt{a \sec (e+f x)+a}}{c f}+\frac{2 \sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{a \sec (e+f x)+a}}\right )}{c f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3904
Rule 3887
Rule 325
Rule 203
Rubi steps
\begin{align*} \int \frac{\sqrt{a+a \sec (e+f x)}}{c-c \sec (e+f x)} \, dx &=-\frac{\int \cot ^2(e+f x) (a+a \sec (e+f x))^{3/2} \, dx}{a c}\\ &=\frac{2 \operatorname{Subst}\left (\int \frac{1}{x^2 \left (1+a x^2\right )} \, dx,x,-\frac{\tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{c f}\\ &=\frac{2 \cot (e+f x) \sqrt{a+a \sec (e+f x)}}{c f}-\frac{(2 a) \operatorname{Subst}\left (\int \frac{1}{1+a x^2} \, dx,x,-\frac{\tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{c f}\\ &=\frac{2 \sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{c f}+\frac{2 \cot (e+f x) \sqrt{a+a \sec (e+f x)}}{c f}\\ \end{align*}
Mathematica [A] time = 0.580177, size = 90, normalized size = 1.3 \[ \frac{2 a \tan (e+f x) \sec (e+f x) \left (\cos (e+f x) \sqrt{\sec (e+f x)-1}-(\cos (e+f x)-1) \tan ^{-1}\left (\sqrt{\sec (e+f x)-1}\right )\right )}{c f (\sec (e+f x)-1)^{3/2} \sqrt{a (\sec (e+f x)+1)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.251, size = 116, normalized size = 1.7 \begin{align*} -{\frac{1}{fc\sin \left ( fx+e \right ) }\sqrt{{\frac{a \left ( 1+\cos \left ( fx+e \right ) \right ) }{\cos \left ( fx+e \right ) }}} \left ( \sqrt{2}\sin \left ( fx+e \right ){\it Artanh} \left ({\frac{\sqrt{2}\sin \left ( fx+e \right ) }{2\,\cos \left ( fx+e \right ) }\sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}} \right ) \sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}-2\,\cos \left ( fx+e \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} -\int \frac{\sqrt{a \sec \left (f x + e\right ) + a}}{c \sec \left (f x + e\right ) - c}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.46504, size = 680, normalized size = 9.86 \begin{align*} \left [\frac{\sqrt{-a} \log \left (-\frac{8 \, a \cos \left (f x + e\right )^{3} - 4 \,{\left (2 \, \cos \left (f x + e\right )^{2} - \cos \left (f x + e\right )\right )} \sqrt{-a} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right ) - 7 \, a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right ) + 1}\right ) \sin \left (f x + e\right ) + 4 \, \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{2 \, c f \sin \left (f x + e\right )}, \frac{\sqrt{a} \arctan \left (\frac{2 \, \sqrt{a} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right )}{2 \, a \cos \left (f x + e\right )^{2} + a \cos \left (f x + e\right ) - a}\right ) \sin \left (f x + e\right ) + 2 \, \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{c f \sin \left (f x + e\right )}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} - \frac{\int \frac{\sqrt{a \sec{\left (e + f x \right )} + a}}{\sec{\left (e + f x \right )} - 1}\, dx}{c} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]